<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link href="../static/css/bootstrap.min.css"  type="text/css" rel="stylesheet">
<link href="../static/css/jquery-ui.css"  type="text/css" rel="stylesheet">
<link href="../static/css/index.css" type="text/css" rel="stylesheet">
<link  href="../static/css/zTreeStyle.css" type="text/css" rel="stylesheet">
<!--树状图-->

<title>通知-上级通知</title>
</head>

<body>
<!--头部-->
<nav class="navbar navbar-default navbar-fixed-top  top" role="navigation">
  <div class="container-fluid">
    <div class="navbar-header" style=" width:100%;"> <a class="navbar-brand" href="javascript:history.go(-1);" style=" width:100%;  padding-right:0px;"> <span class="glyphicon glyphicon-arrow-left white"></span> 
      <!--    <span class="glyphicon glyphicon-pause white" style="margin-left:2%;"></span>--> 
      <span class="white" style="margin-left:10%">上级通知列表</span> <span class="glyphicon glyphicon-user white" style="float:right"></span> </a> </div>
  </div>
  <!-- /.container-fluid --> 
</nav>
<!--头部 end--> 
<!--主体部分-->

<div class="container" style="margin-top:70px;">
  <div class="row" style="margin-top:10px;margin-bottom:20px;">
    <div class="col-sm-12 distance" >
      <div class="form-group">
        <div class="col-sm-10 ">
          <div class="col-xs-6"><a type="button" class="btn btn-default" href="superior_notice.html">上级通知</a> </div>
          <div class="col-xs-6"><a type="button" class="btn btn-primary " href="dispenselist.html">分发列表</a></div>
        </div>
      </div>
    </div>
  </div>
  
  <!-- <div class="row" style="margin-right:10%;">
    <div  class="col-xs-sm  text-right" > <a class="btn btn-primary" href="superior notice-add.html" style="width:30%">增加</a></div>
  </div>-->
  <div class="row" style="margin-top:10px;">
    <form method="post" action="">
      <div class="col-sm-12 distance hierarchy2">
        <div class="form-group">
          <label for="" class="col-sm-2 control-label">标题:</label>
          <div class="col-sm-10">
            <input type="text" id="" class="form-control " >
          </div>
        </div>
      </div>
      <div class="col-sm-12 distance hierarchy" >
        <div class="form-group hierarchy" >
          <label for="" class="col-sm-2 control-label">上级部门:</label>
          <div class="col-sm-10">
            <select class="form-control">
              <option selected="selected">全部</option>
              <option>2</option>
              <option>3</option>
              <option>4</option>
              <option>5</option>
            </select>
          </div>
        </div>
      </div>
      <div class="col-sm-12 distance hierarchy2">
        <div class="form-group">
          <label for="" class="col-sm-2 control-label">开始时间:</label>
          <div class="col-sm-10">
            <input type="text" id="start_time" class="form-control "   >
          </div>
        </div>
      </div>
      <div class="col-sm-12 distance hierarchy2">
        <div class="form-group">
          <label for="" class="col-sm-2 control-label">结束时间:</label>
          <div class="col-sm-10">
            <input type="text" id="end_time" class="form-control "   >
          </div>
        </div>
      </div>
      <div class="col-xs-12 distance" >
      <div class="form-group  text-center" style="padding-top:0px;">
      <button type="button" class="btn btn-success absolutely ">
      搜索
      <tton>
      </div>
      </div>
    </form>
  </div>
  <div class="row" style="margin-top:15px;margin-left:1px; margin-right:1px;">
    <table class="table table-striped table-bordered text-center"  id="middles">
      <tr>
        <td>标题</td>
        <td>上级部门</td>
      </tr>
      <tr>
        <td>文档号</td>
        <td>1</td>
      </tr>
      <tr>
        <td>上级部门</td>
        <td>1</td>
      </tr>
      <tr>
        <td>下达时间</td>
        <td>通过</td>
      </tr>
      <tr>
        <td>要求完成时间</td>
        <td>通过</td>
      </tr>
      <tr>
        <td>备注</td>
        <td>通过</td>
      </tr>
      <tr>
        <td>附件</td>
        <td>通过</td>
      </tr>
      <tr>
        <td>分发对象</td>
        <td>通过</td>
      </tr>
      <tr>
        <td>操作</td>
        <td ><a type="button" class="btn btn-warning  " href="superior_notice_select.html" >查看</a>
      </tr>
      
      <!-- Modal -->
      <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
          <div class="modal-content">
            <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
              <h4 class="modal-title" id="myModalLabel">选择分发对象:</h4>
            </div>
            <div class="modal-body">
              <div class="row">
                <div class="col-xs-12">选择教师</div>
                <div class="col-xs-8 col-xs-offset-4">
                  <ul id="tree2" class="ztree">
                  </ul>
                  <div style="display:none;"> 被勾选时：
                    <input type="checkbox" id="py" class="checkbox first" checked />
                    <span>关联父</span>
                    <input type="checkbox" id="sy" class="checkbox first" checked />
                    <span>关联子</span><br/>
                    取消勾选时：
                    <input type="checkbox" id="pn" class="checkbox first" checked />
                    <span>关联父</span>
                    <input type="checkbox" id="sn" class="checkbox first" checked />
                    <span>关联子</span><br/>
                  </div>
                </div>
              </div>
              <!--row end-->
              
              <div class="row">
                <div class="col-xs-12">选择学生</div>
                <div class="col-xs-8 col-xs-offset-4">
                  <ul id="treeDemo" class="ztree" >
                  </ul>
                  <div style="display:none;"> 被勾选时：
                    <input type="checkbox" id="py" class="checkbox first" checked />
                    <span>关联父</span>
                    <input type="checkbox" id="sy" class="checkbox first" checked />
                    <span>关联子</span><br/>
                    取消勾选时：
                    <input type="checkbox" id="pn" class="checkbox first" checked />
                    <span>关联父</span>
                    <input type="checkbox" id="sn" class="checkbox first" checked />
                    <span>关联子</span><br/>
                  </div>
                </div>
              </div>
            </div>
            <!--modal-body-->
            <div class="modal-footer"> 
              <!--<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>-->
              <button type="button" class="btn btn-primary"  onClick="function c()">保存</button>
            </div>
          </div>
        </div>
      </div>
      
      <!-- Modal  end -->
    </table>
  </div>
</div>
<!--container  end--> 

<!--主体部分  end--> 
<!--底部-->

<div class="container" style="margin-top:25%;">
  <div class="row">
    <div class="footer navbar-fixed-bottom">
      <div class="col-xs-12" style=" height:15%"></div>
      <div class="col-md-4  col-xs-4 text-center" >
        <p class="glyphicon glyphicon-home white footer_font"></p>
        <p><a href="" class="white  footer_font2">首页</a></p>
      </div>
      <div class="col-md-4 col-xs-4 text-center white  ">
        <p class="glyphicon glyphicon-comment white  footer_font"></p>
        <p><a href=""  class="white  footer_font2">消息</a></p>
      </div>
      <div class="col-md-4 col-xs-4 text-center white" >
        <p class="glyphicon glyphicon-asterisk white footer_font"></p>
        <p ><a href=""  class="white  footer_font2">设置</a></p>
      </div>
    </div>
    <!--footer  end--> 
    
  </div>
  <!--row  end--> 
  
</div>
<!--container  end--> 

<!--底部end--> 
<script src="../static/js/jquery.min.js" type="text/javascript"></script> 
<script src="../static/js/bootstrap.min.js"  type="text/javascript"></script> 
<script src="../static/js/jquery-ui.js"  type="text/javascript"></script><!--日历--> 
<script type="text/javascript" src="../static/js/jquery.ztree.core-3.5.js"></script><!--树状图--> 
<script type="text/javascript" src="../static/js/jquery.ztree.excheck-3.5.js"></script><!--树状图--> 
<script type="text/javascript">
		var setting = {
			check: {
				enable: true,	
			},
			data: {
				simpleData: {
					enable: true
				}
			}
		};
		var zNodes =[
			{ id:1, pId:0, name:"初一级"},
			{ id:11, pId:1, name:"初一1班",},
			{ id:11, pId:1, name:"初一2班",},
			{ id:11, pId:1, name:"初一3班",},
			{ id:2, pId:0, name:"初二级"},
			{ id:21, pId:2, name:"初二2班"},
			{ id:21, pId:2, name:"初二2班"},
			{ id:21, pId:2, name:"初二2班"},
			{ id:21, pId:2, name:"初二2班"},
			{ id:3, pId:0, name:"初三级"},
			{ id:31, pId:3, name:"初三2班"},
			{ id:31, pId:3, name:"初三2班"},
			{ id:31, pId:3, name:"初三2班"},
			{ id:31, pId:3, name:"初三2班"},
		];
		var code;
		
		function setCheck1() {
			var zTree = $.fn.zTree.getZTreeObj("tree2"),
			py = $("#py").attr("checked")? "p":"",
			sy = $("#sy").attr("checked")? "s":"",
			pn = $("#pn").attr("checked")? "p":"",
			sn = $("#sn").attr("checked")? "s":"",
			type = { "Y":py + sy, "N":pn + sn};
			zTree.setting.check.chkboxType = type;
			showCode('setting.check.chkboxType = { "Y" : "' + type.Y + '", "N" : "' + type.N + '" };');
		}
		function showCode(str) {
			if (!code) code = $("#code");
			code.empty();
			code.append("<li>"+str+"</li>");
		}
		$(document).ready(function(){
			$.fn.zTree.init($("#tree2"), setting, zNodes);
			setCheck1();
			$("#py").bind("change", setCheck1);
			$("#sy").bind("change", setCheck1);
			$("#pn").bind("change", setCheck1);
			$("#sn").bind("change", setCheck1);
		});
		
		function c()
{
	var delidID = "";
	var zTree = $.fn.zTree.getZTreeObj("treeDemo").getCheckedNodes(true);//获取所有选中状态的节点  
	for (var i = 0; i < zTree.length; i++) {  
		//delidID += zTree[i].id + ",";
		$("#hiddenBox").append('<input type="hidden" name="pid[]" value="'+zTree[i].id+'">');
	}
	var zTree = $.fn.zTree.getZTreeObj("tree2").getCheckedNodes(true);//获取所有选中状态的节点  
	for (var i = 0; i < zTree.length; i++) {  
		//delidID += zTree[i].id + ",";
		$("#hiddenBox").append('<input type="hidden" name="pid[]" value="'+zTree[i].id+'">');
	}
} 		
</script> 
<script type="text/javascript">
		var setting = {
			check: {
				enable: true,	
			},
			data: {
				simpleData: {
					enable: true
				}
			}
		};
		var zNodes =[
			{ id:1, pId:0, name:"初一级"},
			{ id:11, pId:1, name:"初一1班",},
			{ id:11, pId:1, name:"初一2班",},
			{ id:11, pId:1, name:"初一3班",},
			{ id:2, pId:0, name:"初二级"},
			{ id:21, pId:2, name:"初二2班"},
			{ id:21, pId:2, name:"初二2班"},
			{ id:21, pId:2, name:"初二2班"},
			{ id:21, pId:2, name:"初二2班"},
			{ id:3, pId:0, name:"初三级"},
			{ id:31, pId:3, name:"初三2班"},
			{ id:31, pId:3, name:"初三2班"},
			{ id:31, pId:3, name:"初三2班"},
			{ id:31, pId:3, name:"初三2班"},
		];
		var code;
		
		function setCheck() {
			var zTree = $.fn.zTree.getZTreeObj("treeDemo"),
			py = $("#py").attr("checked")? "p":"",
			sy = $("#sy").attr("checked")? "s":"",
			pn = $("#pn").attr("checked")? "p":"",
			sn = $("#sn").attr("checked")? "s":"",
			type = { "Y":py + sy, "N":pn + sn};
			zTree.setting.check.chkboxType = type;
			showCode('setting.check.chkboxType = { "Y" : "' + type.Y + '", "N" : "' + type.N + '" };');
		}
		function showCode(str) {
			if (!code) code = $("#code");
			code.empty();
			code.append("<li>"+str+"</li>");
		}
		$(document).ready(function(){
			$.fn.zTree.init($("#treeDemo"), setting, zNodes);
			setCheck();
			$("#py").bind("change", setCheck);
			$("#sy").bind("change", setCheck);
			$("#pn").bind("change", setCheck);
			$("#sn").bind("change", setCheck);
		});
</script> 

<!--日历--> 
<script>
  $(function() {
    $( "#start_time" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
	  changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#end_time" ).datepicker( "option", "minDate", selectedDate );
      }
    });
    $( "#end_time" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
      changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#start_time" ).datepicker( "option", "maxDate", selectedDate );
      }
    });
  });
  </script>
</body>
</html>
